<script lang="ts">
import {UploadOutlined} from '@ant-design/icons-vue';
import {defineComponent, ref} from 'vue';
import type {UploadProps} from 'ant-design-vue';

export default defineComponent({
  components: {
    UploadOutlined,
  },
  setup() {
    const fileList = ref<UploadProps['fileList']>([]);
    const fileList2 = ref<UploadProps['fileList']>([]);

    return {
      fileList,
      fileList2,
    };
  },
});
</script>
<template>
  <a-space direction="vertical" style="width: 100%" size="large">
    <a-upload
      v-model:file-list="fileList"
      list-type="picture"
      :max-count="2"
      multiple
      action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
    >
      <a-button>
        <upload-outlined></upload-outlined>
        Upload (Max: 2)
      </a-button>
    </a-upload>
    <a-upload
      v-model:file-list="fileList2"
      list-type="picture"
      :max-count="3"
      action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
    >
      <a-button>
        <upload-outlined></upload-outlined>
        Upload (Max: 3)
      </a-button>
    </a-upload>
  </a-space>
</template>
